PROJ_HOME=$(shell pwd)
REP_DIR=$(PROJ_HOME)/coverage-report

all:
	echo "targets: clean test"

.config.lisp: Makefile
	@test -d $(REP_DIR) || mkdir $(REP_DIR)
	@echo "(defvar *project-home* \"$(PROJ_HOME)/\")" > .config.lisp
	@echo "(defvar *report-directory* \"$(REP_DIR)/\")" >> .config.lisp
	@echo "(export '(*project-home* *report-directory*))" >> .config.lisp

clean: .config.lisp
	-find . -name '*.fasl' | xargs rm

test: .config.lisp clean
	sbcl --noinform --load .config.lisp --load src/run-with-coverage.lisp 
